# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        黄周云  
# Name:         demo01
# Description:
# Author:       ASUS
# Date:         2019/3/13
#-------------------------------------------------------------------------------


class Man(object):
    def __init__(self):
        self.name = 'yzl'
        self.age = 40
        self.__aa = "abc"
    def helo(self):                    #第一个参数必须是self
        self.salary = 8000             #任何一个函数都可以定义属性
        print("hello")
    def __myage(self):                 #方法私有化，在方法名前加“__”
        return self.age
    def getAA(self):                   #定义公共函数访问私有属性
        return self.__aa

if __name__ == '__main__':
    man = Man()
    man.helo()  # 通过“.”来调用属性和方法
    print(man.name, man.age)
    print(type(man.age))
    print(man.salary)
    man.bankcode = '100012346'
    print(man.bankcode)
    print(man._Man__myage())
    print(man.getAA())




